function dprintf( fid, format, varargin )
% Debug info print
%   Print text only if global variables 'Debug' or 'fullDebug' is set to 1.

global Debug fullDebug

if ((~isempty(Debug) && Debug == 1) || ...
    (~isempty(fullDebug) == 1 && fullDebug == 1))
    fprintf(fid, format, varargin{:});
end

